<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'client-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'client_lastname'); ?>
		<?php echo $form->textField($model,'client_lastname',array('size'=>60,'maxlength'=>100)); ?>
		<?php echo $form->error($model,'client_lastname'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'client_firstname'); ?>
		<?php echo $form->textField($model,'client_firstname',array('size'=>60,'maxlength'=>100)); ?>
		<?php echo $form->error($model,'client_firstname'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'client_midname'); ?>
		<?php echo $form->textField($model,'client_midname',array('size'=>60,'maxlength'=>100)); ?>
		<?php echo $form->error($model,'client_midname'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'gender'); ?>
		<?php echo $form->dropdownList($model,'gender', $model->getGender()); ?>
		<?php echo $form->error($model,'gender'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'birthdate'); ?>
		<!--?php echo $form->textField($model,'birthdate');?-->
		<?php $this->widget('zii.widgets.jui.CJuiDatePicker', array(
		'name'=>'LeaveSummary[birthdate]', // LeaveSummary (Model) , LS_FROM (Attribute) 
		'model'=>$model,
		'attribute'=>'birthdate',
		// additional javascript options for the date picker plugin
		'options'=>array(
		'showAnim'=>'fold',
		'changeMonth'=>true,
		'changeYear'=>true,
		'yearRange'=>'1800:$arrYears', 
		'mode'=>'datetime',
		'dateFormat'=>'yy-mm-dd',
		'showButtonPanel'=>true,
        'yearRange'=>'1900:2090',
		'debug'=>true,
		//'buttonImage'=>'images/calendar.png'
		),
		'htmlOptions'=>array(
		'style'=>'height:20px;',
		'placeholder'=>'Click to select date',
		),
		));	
		?>
		<?php echo $form->error($model,'birthdate'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'birthplace'); ?>
		<?php echo $form->textField($model,'birthplace',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'birthplace'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'phonenum'); ?>
		<?php echo $form->textField($model,'phonenum',array('size'=>10,'maxlength'=>10)); ?>
		<?php echo $form->error($model,'phonenum'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'mobilenum'); ?>
		<?php echo $form->textField($model,'mobilenum',array('size'=>13,'maxlength'=>13)); ?>
		<?php echo $form->error($model,'mobilenum'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'business_phone'); ?>
		<?php echo $form->textField($model,'business_phone',array('size'=>10,'maxlength'=>10)); ?>
		<?php echo $form->error($model,'business_phone'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'address'); ?>
		<?php echo $form->textField($model,'address',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'address'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'zipcode'); ?>
		<?php echo $form->textField($model,'zipcode',array('size'=>4,'minlength'=>4,'maxlength'=>4)); ?>
		<?php echo $form->error($model,'zipcode'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'city_province'); ?>
		<?php echo $form->textField($model,'city_province',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'city_province'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'marital_status'); ?>
		<!--<?php echo $form->textField($model,'marital_status',array('size'=>45,'maxlength'=>45)); ?>-->
		<?php echo $form->dropdownList($model,'marital_status', $model->getMaritalStatus()); ?>
		<?php echo $form->error($model,'marital_status'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'occupation'); ?>
		<?php echo $form->textField($model,'occupation',array('size'=>50,'maxlength'=>50)); ?>
		<?php echo $form->error($model,'occupation'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'monthly_income'); ?>
		<?php echo $form->textField($model,'monthly_income',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'monthly_income'); ?>
	</div>

	<div class="row">
		<!--?php echo $form->labelEx($model,'isAssured'); ?-->
		<?php echo $form->hiddenField($model,'isAssured'); ?> 
		<!--?php echo $form->error($model,'isAssured'); ?-->
	</div>
	
	<div class="row">
		<?php echo $form->labelEx($model,'employee_id'); ?>
   <!-- <?php echo $form->textField($model,'employee_id'); ?> -->
		<?php echo $form->dropDownList($model, 'employee_id', $model->getEmployees()); ?>
		<?php echo $form->error($model,'employee_id'); ?>
	</div>

	<div class="row">
		<!--?php echo $form->labelEx($model,'user_id'); ?-->
		<?php echo $form->hiddenField($model,'user_id', array('value'=>Yii::app()->user->id)); ?>
		<?php echo $form->error($model,'user_id'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->